package oo_day05;

public class StaticDemo {
    public static void main(String[] args) {
        StaticVar o1 = new StaticVar();
        o1.show();
        StaticVar o2 = new StaticVar();
        o2.show();
        StaticVar o3 = new StaticVar();
        o3.show();
        System.out.println(StaticVar.b);

        StaticBlock o4 = new StaticBlock();//先"静态块",再输出"构造方法"
        StaticBlock o5 = new StaticBlock();//只输出"构造方法",没有静态块,因为只加载一次
        StaticBlock o6 = new StaticBlock();//只输出"构造方法",没有静态块,因为只加载一次


    }
}









